<%@ Page Language="C#" MasterPageFile="~/BluePortalMaster.Master" AutoEventWireup="true"
    CodeBehind="Details.aspx.cs" Inherits="BluePortal.QuikStart.Details" Title="Untitled Page" %>

<%@ Register Assembly="VRK.Controls" Namespace="VRK.Controls" TagPrefix="cc1" %>
<%@ Register Src="UserControls/VideoList.ascx" TagName="VideoList" TagPrefix="uc1" %>
<%@ Register Src="UserControls/MediaRating.ascx" TagName="MediaRating" TagPrefix="uc2" %>
<%@ Register Src="UserControls/MediaComment.ascx" TagName="MediaComment" TagPrefix="uc3" %>
<%@ Register Src="UserControls/MediaProperties.ascx" TagName="MediaProperties" TagPrefix="uc4" %>
<%@ Register src="UserControls/AddChannelVideo.ascx" tagname="AddChannelVideo" tagprefix="uc5" %>
<%@ Register src="UserControls/MediaDescription.ascx" tagname="MediaDescription" tagprefix="uc6" %>

<asp:Content ID="Content1" ContentPlaceHolderID="DefaultContent" runat="server">
    <asp:ScriptManagerProxy runat="server" ID="ScriptManagerProxy1">
        <Services>
            <asp:ServiceReference Path="~/Services/Ajax/WSPlayer.asmx" />
        </Services>
        <Scripts>
            <asp:ScriptReference Path="~/JavaScript/PreviewXaml.js" />            
            <asp:ScriptReference Path="~/JavaScript/PreviewScript.js" />
            <asp:ScriptReference Path="~/JavaScript/PreviewMedia.js" />
            <asp:ScriptReference Path="~/JavaScript/bluePlayer.xaml.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <asp:Panel ID="Panel2" runat="server" Width="100%">
        <div id="SilverlightControlHost" style="width: 600px; height: 440px; overflow: hidden; float: left;">
            <script type="text/javascript">
                var player = new bluePlayer('<%= Request.QueryString["vid"] %>', '<%= this.MediaType %>');
            </script>
        </div>
        <div id="TVProperty" style="width: 150px; padding-left: 20px; float: left;">
            <table>
                <tr>
                    <td>
                        <uc2:MediaRating ID="Rating1" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <uc4:MediaProperties ID="Properties1" runat="server" />
                    	<uc5:AddChannelVideo ID="AddChannelVideo1" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <div class="drawer">
        <h1>
            Description</h1>
        <div class="drawer-content">
             <uc6:MediaDescription ID="Description1" runat="server" />
        </div>
    </div>
    <div class="drawer">
        <h1>
            Tag</h1>
        <div class="drawer-content">
            <cc1:Cloud ID="Cloud1" runat="server" DataHrefField="Name" DataHrefFormatString="Browse.aspx?tag={0}"
                DataTextField="Name" DataTitleField="Weight" DataTitleFormatString="{0} Videos"
                DataWeightField="Weight">
            </cc1:Cloud>
        </div>
    </div>
    <div class="drawer">
        <h1>
            Comments</h1>
        <div class="drawer-content">
            <asp:Panel ID="Panel1" runat="server" Width="100%">
                <uc3:MediaComment ID="VideoComment1" runat="server" />
            </asp:Panel>
        </div>
    </div>

    <script type="text/javascript">
			function pageLoad()
			{
                
                if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack())
                {
			        <asp:Literal id="literalSilverLight" runat="server"></asp:Literal>
			    }
            }
            
            function PlayVideoURL(url)
            {
                player.playUrl(url);
            }
            
            function PlayVideoID(vid)
            {
                player.playVid(vid);
            }
    </script>

</asp:Content>
